//---------------------------------------------------------------------------------------------------
inline bool Renderer::IsActive() const
{
	return true;
}
//---------------------------------------------------------------------------------------------------
inline int Renderer::GetMaxLights ()
{
    return ms_iMaxLights;
}
//---------------------------------------------------------------------------------------------------
inline int Renderer::GetMaxColors ()
{
    return ms_iMaxColors;
}
//---------------------------------------------------------------------------------------------------
inline int Renderer::GetMaxTCoords ()
{
    return ms_iMaxTCoords;
}
//---------------------------------------------------------------------------------------------------
inline int Renderer::GetMaxVShaderImages ()
{
    return ms_iMaxVShaderImages;
}
//---------------------------------------------------------------------------------------------------
inline int Renderer::GetMaxPShaderImages ()
{
    return ms_iMaxPShaderImages;
}
//---------------------------------------------------------------------------------------------------
inline int Renderer::GetMaxStencilIndices ()
{
    return ms_iMaxStencilIndices;
}
//---------------------------------------------------------------------------------------------------
inline int Renderer::GetMaxUserClipPlanes ()
{
    return ms_iMaxUserClipPlanes;
}
//---------------------------------------------------------------------------------------------------
inline float Renderer::GetMaxAnisotropy ()
{
    return ms_fMaxAnisotropy;
}
//---------------------------------------------------------------------------------------------------
inline Matrix4f Renderer::GetWorldMatrix() const
{
	return m_kWorldMatrix;
}
//---------------------------------------------------------------------------------------------------
inline Matrix4f Renderer::GetViewMatrix() const
{
	return m_kViewMatrix;
}
//---------------------------------------------------------------------------------------------------
inline Matrix4f Renderer::GetProjectionMatrix() const
{
	return m_kProjectionMatrix;
}
//---------------------------------------------------------------------------------------------------
inline Matrix4f Renderer::GetViewProjectionMatrix() const
{
	return m_kViewMatrix*m_kProjectionMatrix;
}
//---------------------------------------------------------------------------------------------------
inline Matrix3f Renderer::GetNormalMatrix() const
{
	return Matrix3f(m_kViewMatrix[0], m_kViewMatrix[1], m_kViewMatrix[2],
					m_kViewMatrix[4], m_kViewMatrix[5], m_kViewMatrix[6],
					m_kViewMatrix[8], m_kViewMatrix[9], m_kViewMatrix[10]);
}
//---------------------------------------------------------------------------------------------------
inline Matrix4f Renderer::GetOrthoMatrix() const
{
	return m_kOrthoMatrix;
}
//---------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------
inline void Renderer::SetMaterialState (MaterialState* pkState)
{
    m_aspkState[GlobalState::MATERIAL] = pkState;
}
//---------------------------------------------------------------------------------------------------
inline AlphaState* Renderer::GetAlphaState ()
{
    return StaticCast<AlphaState>(m_aspkState[GlobalState::ALPHA]);
}
//---------------------------------------------------------------------------------------------------
inline CullState* Renderer::GetCullState ()
{
    return StaticCast<CullState>(m_aspkState[GlobalState::CULL]);
}
//---------------------------------------------------------------------------------------------------
inline MaterialState* Renderer::GetMaterialState ()
{
    return StaticCast<MaterialState>(m_aspkState[GlobalState::MATERIAL]);
}
//---------------------------------------------------------------------------------------------------
inline PolygonOffsetState* Renderer::GetPolygonOffsetState ()
{
    return StaticCast<PolygonOffsetState>(m_aspkState[GlobalState::POLYGONOFFSET]);
}
//---------------------------------------------------------------------------------------------------
inline StencilState* Renderer::GetStencilState ()
{
    return StaticCast<StencilState>(m_aspkState[GlobalState::STENCIL]);
}
//---------------------------------------------------------------------------------------------------
inline WireframeState* Renderer::GetWireframeState ()
{
    return StaticCast<WireframeState>(m_aspkState[GlobalState::WIREFRAME]);
}
//---------------------------------------------------------------------------------------------------
inline ZBufferState* Renderer::GetZBufferState ()
{
    return StaticCast<ZBufferState>(m_aspkState[GlobalState::ZBUFFER]);
}
//---------------------------------------------------------------------------------------------------
inline void Renderer::SetLight (int i, Light* pkLight)
{
    assert(0 <= i && i < ms_iMaxLights);
    m_aspkLight[i] = (Object*)pkLight;
}
//---------------------------------------------------------------------------------------------------
inline Light* Renderer::GetLight (int i)
{
    assert(0 <= i && i < ms_iMaxLights);
    return StaticCast<Light>(m_aspkLight[i]);
}
//---------------------------------------------------------------------------------------------------